package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.suoyao.SuoYaoBoxData;
import com.yanqu.road.entity.activity.suoyao.SuoYaoNotice;
import com.yanqu.road.entity.activity.suoyao.SuoYaoUserData;
import com.yanqu.road.entity.activity.suoyao.config.SuoYaoBookConfig;
import com.yanqu.road.entity.activity.suoyao.config.SuoYaoRewardConfig;
import com.yanqu.road.entity.activity.suoyao.config.SuoYaoTopRewardConfig;
import com.yanqu.road.entity.activity.suoyao.config.SuoYaoViewBookConfig;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class SuoYaoBusiness {

    /**
     * 配置
     */

    public static Map<Integer, Map<Integer, SuoYaoRewardConfig>> getSuoYaoRewardConfigMap(int activityId) {
        return DaoHelper.getSuoYaoRewardConfigDaoImpl().getSuoYaoRewardConfigMap(activityId);
    }

    public static List<SuoYaoBookConfig> getSuoYaoBookConfigList(int activityId) {
        return DaoHelper.getSuoYaoBookConfigDaoImpl().getSuoYaoBookConfigList(activityId);
    }

    public static Map<Integer, SuoYaoTopRewardConfig> getSuoYaoTopRewardConfigMap(int activityId){
        return DaoHelper.getSuoYaoTopRewardConfigDaoImpl().getSuoYaoTopRewardConfigMap(activityId);
    }

    public static Map<Integer, SuoYaoViewBookConfig> getSuoYaoViewBookConfigMap(int activityId){
        return DaoHelper.getSuoYaoViewBookConfigDaoImpl().getSuoYaoViewBookConfigMap(activityId);
    }

    /**
     * 用户数据
     */

    public static SuoYaoUserData getSuoYaoUserData(int activityId, long userId) {
        return DaoHelper.getSuoYaoUserDataDaoImpl().getSuoYaoUserData(activityId, userId);
    }

    public static boolean addSuoYaoUserData(SuoYaoUserData data) {
        return DaoHelper.getSuoYaoUserDataDaoImpl().add(data);
    }

    public static boolean updateSuoYaoUserData(SuoYaoUserData data) {
        return DaoHelper.getSuoYaoUserDataDaoImpl().update(data);
    }

    /**
     * 跨服隐藏盲盒数
     */

    public static SuoYaoBoxData getSuoYaoBoxData(int activityId) {
        return DaoHelper.getSuoYaoBoxDataDaoImpl().getSuoYaoBoxData(activityId);
    }

    public static boolean addSuoYaoBoxData(SuoYaoBoxData data) {
        return DaoHelper.getSuoYaoBoxDataDaoImpl().add(data);
    }

    public static boolean updateSuoYaoBoxData(SuoYaoBoxData data) {
        return DaoHelper.getSuoYaoBoxDataDaoImpl().update(data);
    }

    /**
     * 跨服公告
     */

    public static List<SuoYaoNotice> getSuoYaoNoticeList(int activityId) {
        return DaoHelper.getSuoYaoNoticeDaoImpl().getSuoYaoNoticeList(activityId);
    }

    public static boolean addSuoYaoNotice(SuoYaoNotice data) {
        return DaoHelper.getSuoYaoNoticeDaoImpl().add(data);
    }
}
